gtk4.git
4 years agowindow: Defer focus setting until after paint
Matthias Clasen [Fri, 9 Apr 2021 23:38:25 +0000 (19:38 -0400)]
window: Defer focus setting until after paint

Commit 3dbf5038fab8eb0d8c11 tried to defer focus changes
until after rendering is done. But it failed to do so, since
the toplevel ::render handler is still before rendering of
popups that are attached to that toplevel. To do this
properly, we need to do it in the AFTER_PAINT frame clock
phase.

Fixes: #3725
4 years agoMerge branch 'no-scroll-cursor' into 'master'
Matthias Clasen [Fri, 9 Apr 2021 13:30:36 +0000 (13:30 +0000)]
Merge branch 'no-scroll-cursor' into 'master'

scrolledwindow: Stop using scroll cursors

See merge request GNOME/gtk!3416

4 years agoMerge branch 'ebassi/ci-docs' into 'master'
Matthias Clasen [Fri, 9 Apr 2021 12:35:49 +0000 (12:35 +0000)]
Merge branch 'ebassi/ci-docs' into 'master'

ci: Drop the split Fedora images

See merge request GNOME/gtk!3415

4 years agoscrolledwindow: Stop using scroll cursors
Matthias Clasen [Fri, 9 Apr 2021 12:26:09 +0000 (08:26 -0400)]
scrolledwindow: Stop using scroll cursors

We used to override cursor to use all-scroll while the
content is being scrolled. Unfortunately, there is several
problems with this:
- It is really only expected certain devices, and we don't
  have the device information on Wayland
- With the way cursor setting works in GTK4, non-NULL cursors
  of the content (eg the text views ibeam) win, making the
  scroll cursor not show up
- Under X11, we seem to miss scroll end events and then
  the scroll cursor gets stuck
Therefore, just remove this feature.

4 years agoci: Drop the split Fedora images
Emmanuele Bassi [Fri, 9 Apr 2021 11:28:08 +0000 (12:28 +0100)]
ci: Drop the split Fedora images

Now that we don't need the whole of Pandoc to build our documentation,
we can go back to a single Fedora image for our CI.

4 years agoMerge branch 'half-float' into 'master'
Matthias Clasen [Fri, 9 Apr 2021 03:34:05 +0000 (03:34 +0000)]
Merge branch 'half-float' into 'master'

ngl: Use fp16 for colors

See merge request GNOME/gtk!3405

4 years agoMerge branch 'font-fallback-fix' into 'master'
Matthias Clasen [Thu, 8 Apr 2021 11:24:09 +0000 (11:24 +0000)]
Merge branch 'font-fallback-fix' into 'master'

wayland: Improve font setting fallback more

Closes #3838

See merge request GNOME/gtk!3412

4 years agoWork around compiler shortcomings on macOS
Matthias Clasen [Thu, 8 Apr 2021 02:38:47 +0000 (22:38 -0400)]
Work around compiler shortcomings on macOS

alias attributes don't work on Darwin, so
do without.

4 years agogsk: Add runtime checks for F16C
Matthias Clasen [Thu, 8 Apr 2021 01:29:21 +0000 (21:29 -0400)]
gsk: Add runtime checks for F16C

Use an IFUNC resolver to determine whether we can use
intrinsics for FP16 conversion. This requires the functions
to be no longer inline.

Sadly, it turns out that __builtin_cpu_supports ("f16c")
doesn't compile on the systems where we want it to prevent
us from getting a SIGILL at runtime.

4 years agoAdd an option to disable F16C
Matthias Clasen [Wed, 7 Apr 2021 23:41:54 +0000 (19:41 -0400)]
Add an option to disable F16C

And add a compile time check for the presence of this
CPU feature.

4 years agoMove color conversion up
Matthias Clasen [Wed, 7 Apr 2021 03:52:33 +0000 (23:52 -0400)]
Move color conversion up

Doing the color conversion early lets us reuse
the results whenever we do more than one draw
per node.

4 years agongl: Use a constant for (fp16)-1
Matthias Clasen [Wed, 7 Apr 2021 03:11:27 +0000 (23:11 -0400)]
ngl: Use a constant for (fp16)-1

No need to convert that again for every glyph.

4 years agongl: Reduce vertex storage
Matthias Clasen [Wed, 7 Apr 2021 02:24:37 +0000 (22:24 -0400)]
ngl: Reduce vertex storage

We only have one shader that uses the color2 attribute,
and it doesn't use the uv attribute, so save vertex
memory by putting those in the same space.

This reduce the per vertex space from 32 to 24 bytes.

4 years agongl: Use fp16 for colors
Matthias Clasen [Wed, 7 Apr 2021 01:55:50 +0000 (21:55 -0400)]
ngl: Use fp16 for colors

This reduces the size of our Vertex struct from
48 to 32 bytes. It would be nicer if we could store
the colors in fp16 format in the rendernodes, and
avoid conversion here. But this is still good.

4 years agowayland: Improve font setting fallback more
Matthias Clasen [Wed, 7 Apr 2021 18:53:00 +0000 (14:53 -0400)]
wayland: Improve font setting fallback more

We may get a response from the portal that contains
no useful settings at all. In that case, we should
fallback as well.

Fixes: #3838
4 years agoMerge branch 'wip/carlosg/stuck-frames' into 'master'
Matthias Clasen [Wed, 7 Apr 2021 23:18:25 +0000 (23:18 +0000)]
Merge branch 'wip/carlosg/stuck-frames' into 'master'

surface: Always set PHASE_PAINT as pending when updates are scheduled

Closes #3750

See merge request GNOME/gtk!3411

4 years agosurface: Always set PHASE_PAINT as pending when updates are scheduled
Carlos Garnacho [Wed, 7 Apr 2021 19:04:28 +0000 (21:04 +0200)]
surface: Always set PHASE_PAINT as pending when updates are scheduled

At times (most often when closing subsurfaces that are scheduling
relayouts) the PHASE_PAINT handling gets broken with the following
sequence:

1. Surface receives wl_callback.done for the previous frame.
   Surface is thawed.
2. A new update on the surface is scheduled. PHASE_PAINT is
   requested directly on the frame clock. priv->pending_phase is
   left unset in the surface.
3. Surface gets frozen
4. Frame clock processes the update scheduled at 2. The surface
   is frozen, so paint is prevented. PHASE_PAINT is considered
   handled.
5. Compositor emits wl_callback.done again. Surface is thawed.
6. At this point the machinery is off
   - The surface didn't paint but has pending update regions
   - priv->draw_needed is set in the toplevel and other portions
     of the widget tree
   - So queueing redraws is ineffective at eventually calling
     gdk_surface_schedule_update() again on the toplevel surface.
   - We don't paint anymore, so this broken state is not flushed
     until other subsurface changes manage to schedule the missing
     update.

To fix this, always set PHASE_PAINT in priv->pending_phase when
doing gdk_surface_schedule_update(). If the frame clock turns
around before the surface is thawed, it will still be waiting to
be processed the next iteration.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3750
5 years agoMerge branch 'font-settings-fallback-4' into 'master'
Matthias Clasen [Wed, 7 Apr 2021 13:21:38 +0000 (13:21 +0000)]
Merge branch 'font-settings-fallback-4' into 'master'

wayland: Improve font setting fallback

See merge request GNOME/gtk!3407

5 years agowayland: Improve font setting fallback
Matthias Clasen [Wed, 7 Apr 2021 12:49:54 +0000 (08:49 -0400)]
wayland: Improve font setting fallback

When we don't get stettings from the portal, the current
fallback is 'awful fonts'. There is no need for that. Instead,
set the fallback values to grayscale antialiasing with slight
hinting.

5 years agoMerge branch 'textview-last-line' into 'master'
Matthias Clasen [Tue, 6 Apr 2021 16:15:55 +0000 (16:15 +0000)]
Merge branch 'textview-last-line' into 'master'

textview: Fix a problem with the last line

Closes #3835

See merge request GNOME/gtk!3403

5 years agotextview: Fix a problem with the last line
Matthias Clasen [Tue, 6 Apr 2021 15:07:50 +0000 (11:07 -0400)]
textview: Fix a problem with the last line

Sometimes, we missed the last line for display.

Fixes: #3835
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 5 Apr 2021 19:05:15 +0000 (19:05 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

window: Actually enable the inspector by default

Closes #3831

See merge request GNOME/gtk!3401

5 years agomodelbutton: Avoid a crash
Matthias Clasen [Mon, 5 Apr 2021 18:06:42 +0000 (14:06 -0400)]
modelbutton: Avoid a crash

We may not have a popover menu ancestor. The check for
this was forgotten in one of the branches here.

Fixes: #3831
5 years agowindow: Actually enable the inspector by default
Matthias Clasen [Mon, 5 Apr 2021 15:53:09 +0000 (11:53 -0400)]
window: Actually enable the inspector by default

427d216081ea0fd9e2045e changed the default in the schema,
but didn't handle cases where the schema isn't found.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 5 Apr 2021 13:19:29 +0000 (13:19 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

textlayout: Remove some unnecessary code

See merge request GNOME/gtk!3400

5 years agongl: Fix an oversight
Matthias Clasen [Mon, 5 Apr 2021 03:44:26 +0000 (23:44 -0400)]
ngl: Fix an oversight

We were special-casing 2D affine transforms,
but overlooked even simpler transforms.

5 years agotextlayout: Remove an unused function
Matthias Clasen [Mon, 5 Apr 2021 12:47:02 +0000 (08:47 -0400)]
textlayout: Remove an unused function

5 years agotextlayout: Avoid allocations for line iteration
Matthias Clasen [Mon, 5 Apr 2021 03:11:05 +0000 (23:11 -0400)]
textlayout: Avoid allocations for line iteration

No need to collect the lines firs, and allocate memory
for that. We can just iterate over them right away.

5 years agotextlayout: Introduce some locals
Matthias Clasen [Mon, 5 Apr 2021 02:44:09 +0000 (22:44 -0400)]
textlayout: Introduce some locals

No need to call _gtk_text_buffer_get_btree over and over.

5 years agotextlayout: Create the cursor snapshot on demand
Matthias Clasen [Mon, 5 Apr 2021 02:27:13 +0000 (22:27 -0400)]
textlayout: Create the cursor snapshot on demand

We don't need it all the time.

5 years agotextattributes: Small docs fix
Matthias Clasen [Mon, 5 Apr 2021 02:02:24 +0000 (22:02 -0400)]
textattributes: Small docs fix

5 years agotextbtree: Return tags in a GPtrArray
Matthias Clasen [Mon, 5 Apr 2021 02:00:53 +0000 (22:00 -0400)]
textbtree: Return tags in a GPtrArray

One of the callers prefers that, it lets us avoid
copying the array in one place, and generally makes
for better code.

5 years agotextlayout: Only get selection color once
Matthias Clasen [Sun, 4 Apr 2021 03:42:12 +0000 (23:42 -0400)]
textlayout: Only get selection color once

No need to do this for every paragraph that is
inside the selection.

5 years agotexttag: Just use qsort
Matthias Clasen [Sun, 4 Apr 2021 03:01:13 +0000 (23:01 -0400)]
texttag: Just use qsort

No point in trying to optimize this.

5 years agotextbtree: Inline node data handling
Matthias Clasen [Sun, 4 Apr 2021 02:38:20 +0000 (22:38 -0400)]
textbtree: Inline node data handling

5 years agotextbtree: Speed up _gtk_text_btree_find_line_top
Matthias Clasen [Sun, 4 Apr 2021 02:36:43 +0000 (22:36 -0400)]
textbtree: Speed up _gtk_text_btree_find_line_top

Another place where we can avoid allocating a stack
piecemeal.

5 years agotextbtree: Don't opencode realloc
Matthias Clasen [Sun, 4 Apr 2021 02:00:48 +0000 (22:00 -0400)]
textbtree: Don't opencode realloc

We can just use g_realloc here.

5 years agotextbtree: Speed up _gtk_text_line_char_index
Matthias Clasen [Sun, 4 Apr 2021 01:59:47 +0000 (21:59 -0400)]
textbtree: Speed up _gtk_text_line_char_index

No need to allocate a stack piecemeal here.

5 years agotextbtree: Avoid malloc in one place
Matthias Clasen [Sun, 4 Apr 2021 00:25:35 +0000 (20:25 -0400)]
textbtree: Avoid malloc in one place

5 years agotextlayout: Don't call render_para too much
Matthias Clasen [Sun, 4 Apr 2021 02:02:45 +0000 (22:02 -0400)]
textlayout: Don't call render_para too much

render_para produces no nodes for an empty paragraph.
Don't call it over and over for those.

5 years agotextlayout: Remove some unnecessary code
Matthias Clasen [Sun, 4 Apr 2021 02:02:04 +0000 (22:02 -0400)]
textlayout: Remove some unnecessary code

The same field is set again 2 lines down.

5 years agoUpdate Chinese (Taiwan) translation
Chao-Hsiung Liao [Sat, 3 Apr 2021 23:53:57 +0000 (23:53 +0000)]
Update Chinese (Taiwan) translation

(cherry picked from commit 3d3912d7f4ea27ddb9aa79f02bce6bc2d4889bb0)

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sat, 3 Apr 2021 20:14:29 +0000 (20:14 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

gsk: Rename resource paths

See merge request GNOME/gtk!3399

5 years agoMerge branch 'dotted-lines3' into 'master'
Matthias Clasen [Sat, 3 Apr 2021 20:14:13 +0000 (20:14 +0000)]
Merge branch 'dotted-lines3' into 'master'

Modernize error underlines

See merge request GNOME/gtk!3398

5 years agoModernize error underlines
Matthias Clasen [Wed, 31 Mar 2021 03:59:38 +0000 (23:59 -0400)]
Modernize error underlines

Implement PANGO_UNDERLINE_ERROR as a dotted line, instead of
squiggly, which looks quite dated.

5 years agogsk: Move shader resources
Matthias Clasen [Sat, 3 Apr 2021 12:16:50 +0000 (08:16 -0400)]
gsk: Move shader resources

Move the resources of each renderer to its subdirectory.
We've previously done that for the ngl renderer, but it
is better to be consistent and do it for all the renderers.

5 years agogsk: Rename resource paths
Matthias Clasen [Sat, 3 Apr 2021 12:10:58 +0000 (08:10 -0400)]
gsk: Rename resource paths

Make the shaders of the gl renderer live under
/org/gtk/libgsk/gl. This is purely cosmetic.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sat, 3 Apr 2021 03:20:17 +0000 (03:20 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

node test: Improve --generate

See merge request GNOME/gtk!3397

5 years agosettings: Make font-size changes apply immediately
Matthias Clasen [Sat, 3 Apr 2021 03:04:09 +0000 (23:04 -0400)]
settings: Make font-size changes apply immediately

We need to invalidate the style when font-size changes,
because we propagate this value through the initial
value of the CSS font-size property, and it will not
be recomputed otherwise.

5 years agoimmulticontext: Unset client widget on delegate change
Matthias Clasen [Sat, 3 Apr 2021 02:24:19 +0000 (22:24 -0400)]
immulticontext: Unset client widget on delegate change

Forgetting to do so was causing the Wayland im context
to leave behind a dead event controller. This was showing
up as a crash when closing the inspector after changing
the im-module property of a GtkText widget. The crash
was delayed until closing the inspector because the
inspector keeps a ref on the event controllers of the
currently shown widget.

5 years agoimwayland: Name event controllers
Matthias Clasen [Sat, 3 Apr 2021 02:24:00 +0000 (22:24 -0400)]
imwayland: Name event controllers

This helps with debugging.

5 years agowidget-factory: Name an event controller
Matthias Clasen [Sat, 3 Apr 2021 02:23:34 +0000 (22:23 -0400)]
widget-factory: Name an event controller

This helps with debugging.

5 years agotext: Name all event controllers
Matthias Clasen [Sat, 3 Apr 2021 02:23:03 +0000 (22:23 -0400)]
text: Name all event controllers

This helps with debugging.

5 years agoinspector: Support copying nodes to clipboard
Matthias Clasen [Sat, 3 Apr 2021 01:38:14 +0000 (21:38 -0400)]
inspector: Support copying nodes to clipboard

Add a button that copies the serialization of the
selected node to the clipboard.

5 years agonode-editor: Support pasting the image
Matthias Clasen [Sat, 3 Apr 2021 01:24:59 +0000 (21:24 -0400)]
node-editor: Support pasting the image

Add a button that copies the image to the clipboard.

5 years agonodeparser: Change the serialization
Matthias Clasen [Sat, 3 Apr 2021 00:36:58 +0000 (20:36 -0400)]
nodeparser: Change the serialization

Arrange things so that non-child parameters
are always printed before the children. This
greatly helps with readability, which really
suffers when there's hundreds of lines of indented
children between the node start and its parameters.

Update all affected tests.

5 years agonode test: Improve --generate
Matthias Clasen [Sat, 3 Apr 2021 00:35:39 +0000 (20:35 -0400)]
node test: Improve --generate

This is a pet peeve of mine: When we call
g_test_init() before handling --generate,
the random seed spew pollutes the output.
Highly annoying. I've fixes many test binaries
over the years, but more keep popping up.

5 years agoMerge branch 'fix-downscaled-textures' into 'master'
Matthias Clasen [Sat, 3 Apr 2021 00:18:48 +0000 (00:18 +0000)]
Merge branch 'fix-downscaled-textures' into 'master'

ngl: Fix downscaled textures

See merge request GNOME/gtk!3395

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sat, 3 Apr 2021 00:04:36 +0000 (00:04 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

comboboxtext: Remove misleading docs

Closes #3824

See merge request GNOME/gtk!3396

5 years agoMerge branch 'fix-initial-font-selection' into 'master'
Matthias Clasen [Fri, 2 Apr 2021 23:45:59 +0000 (23:45 +0000)]
Merge branch 'fix-initial-font-selection' into 'master'

fontchooser: Fix initial font selection

Closes #3687

See merge request GNOME/gtk!3392

5 years agocomboboxtext: Remove misleading docs
Matthias Clasen [Fri, 2 Apr 2021 23:44:30 +0000 (19:44 -0400)]
comboboxtext: Remove misleading docs

The entry is no longer accessible.
The docs were outdated.

Fixes: #3824
5 years agongl: Avoid huge intermediate textures
Matthias Clasen [Fri, 2 Apr 2021 23:33:44 +0000 (19:33 -0400)]
ngl: Avoid huge intermediate textures

Instead of rendering the unclipped child to a texture
(and risking blowing the texture size limit, and bad
downscaling), just render the clipped region, and live
with the fact that we can't cache the rendered texture.

This avoid bad artifacts when scrolling long textviews
in rounded clips.

5 years agongl: Plug a memory leak
Matthias Clasen [Fri, 2 Apr 2021 22:41:53 +0000 (18:41 -0400)]
ngl: Plug a memory leak

This was introduced in f9457af128012fd3935a69fdcefb.

5 years agongl: Fix downscaled textures
Matthias Clasen [Fri, 2 Apr 2021 22:33:01 +0000 (18:33 -0400)]
ngl: Fix downscaled textures

It is not pretty, but at least it works now.

5 years agoMerge branch 'flat-button-activating' into 'master'
Matthias Clasen [Fri, 2 Apr 2021 18:50:16 +0000 (18:50 +0000)]
Merge branch 'flat-button-activating' into 'master'

button: Style .keyboard-activating on frameless buttons

See merge request GNOME/gtk!3394

5 years agobutton: Style .keyboard-activating on frameless buttons
Chris Mayo [Fri, 2 Apr 2021 18:24:51 +0000 (19:24 +0100)]
button: Style .keyboard-activating on frameless buttons

The use of the keyboard-activating CSS class for buttons was added
in [1], but the style did not apply to buttons with has-frame=FALSE.

[1] 00923615f4 ("button: Add back visual feedback for keynav", 2021-04-01)

5 years agoUpdate Dutch translation
Nathan Follens [Fri, 2 Apr 2021 18:09:01 +0000 (18:09 +0000)]
Update Dutch translation

(cherry picked from commit a356bf6fac604e37cfd4ac6e9c2486a3453ac181)

5 years agofontchooser: Fix initial font selection
Matthias Clasen [Tue, 2 Mar 2021 22:55:30 +0000 (17:55 -0500)]
fontchooser: Fix initial font selection

The change in 740559a54f to populate the list incrementally
broke initial font selection. Fix that, by trying to select
until the incremental filling is done.

Fixes: #3687
5 years agoMerge branch 'theme-reorg' into 'master'
Matthias Clasen [Fri, 2 Apr 2021 03:02:49 +0000 (03:02 +0000)]
Merge branch 'theme-reorg' into 'master'

Reorganize our themes

See merge request GNOME/gtk!3079

5 years agoMake theme fallback working with the new names
Matthias Clasen [Fri, 2 Apr 2021 02:02:38 +0000 (22:02 -0400)]
Make theme fallback working with the new names

Since we are likely going to see theme names like
Adwaita and HighContrast, make fallback work as follows:

Adwaita -> Default
Adwaita:dark -> Default:dark
HighContrast -> Default:hc
HighContrast:dark -> Default:hc-dark
HighContrastInverse -> Default:hc-dark

Other themes will fall back to Default, as before.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 2 Apr 2021 00:38:55 +0000 (00:38 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

testsuite: Sort gsk compare tests

See merge request GNOME/gtk!3389

5 years agotestsuite: Sort gsk compare tests
Matthias Clasen [Thu, 1 Apr 2021 21:03:54 +0000 (17:03 -0400)]
testsuite: Sort gsk compare tests

Easier to find things that way.

5 years agoAdd some more gsk tests
Matthias Clasen [Thu, 1 Apr 2021 21:00:31 +0000 (17:00 -0400)]
Add some more gsk tests

The css-background test contains a node pattern that
is optimized in the ngl renderer.

5 years agoAdd one more compose test
Matthias Clasen [Thu, 1 Apr 2021 20:32:30 +0000 (16:32 -0400)]
Add one more compose test

5 years agoMerge branch 'button-activate-feedback' into 'master'
Matthias Clasen [Thu, 1 Apr 2021 23:36:32 +0000 (23:36 +0000)]
Merge branch 'button-activate-feedback' into 'master'

button: Add back visual feedback for keynav

Closes #3813

See merge request GNOME/gtk!3390

5 years agobutton: Add back visual feedback for keynav
Matthias Clasen [Thu, 1 Apr 2021 22:36:23 +0000 (18:36 -0400)]
button: Add back visual feedback for keynav

We lost the visual feedback for activating a button
via Space or Enter when the :active pseudo-state became
managed. Bring it back with a style class.

Fixes: #3813
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 1 Apr 2021 20:50:04 +0000 (20:50 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Add one more compose test

See merge request GNOME/gtk!3388

5 years agoAdd one more compose test
Matthias Clasen [Thu, 1 Apr 2021 20:32:30 +0000 (16:32 -0400)]
Add one more compose test

5 years agoMerge branch 'us-intl-compose' into 'master'
Matthias Clasen [Thu, 1 Apr 2021 20:01:06 +0000 (20:01 +0000)]
Merge branch 'us-intl-compose' into 'master'

Revert Compose sequence changes

Closes #3807

See merge request GNOME/gtk!3386

5 years agoAdd more compose tests
Matthias Clasen [Thu, 1 Apr 2021 19:18:20 +0000 (15:18 -0400)]
Add more compose tests

Test the sequences whose demise made people
unhappy.

5 years agoRevert Compose sequence changes
Matthias Clasen [Thu, 1 Apr 2021 19:15:47 +0000 (15:15 -0400)]
Revert Compose sequence changes

This was breaking muscle memory of people with
the us intl keyboard layout, for important keys
such as '. The unfortunate side-effect is that
our handling of <dead_acute> is a bit hampered
by sequences that don't fit the pattern. But
such is life.

Fixes: #3807
5 years agoMerge branch 'builder-tag' into 'master'
Emmanuele Bassi [Thu, 1 Apr 2021 18:49:38 +0000 (18:49 +0000)]
Merge branch 'builder-tag' into 'master'

docs: Escape tags in GtkBuilder description

See merge request GNOME/gtk!3385

5 years agodocs: Escape tags in GtkBuilder description
Chris Mayo [Thu, 1 Apr 2021 18:21:57 +0000 (19:21 +0100)]
docs: Escape tags in GtkBuilder description

Fixes the tags and the rest of the gi-docgen created HTML page not being
visible in a browser.

5 years agoDrop Adwaita and HighContrast themes
Matthias Clasen [Fri, 15 Jan 2021 05:52:40 +0000 (00:52 -0500)]
Drop Adwaita and HighContrast themes

These themes will reappear in libadwaita in due course.

5 years agowidget-factory: Use the new themes
Matthias Clasen [Fri, 15 Jan 2021 06:07:47 +0000 (01:07 -0500)]
widget-factory: Use the new themes

Update the Style menu to switch between the variants
of the Default theme.

5 years agoChange the default theme to "Default"
Matthias Clasen [Fri, 15 Jan 2021 05:57:15 +0000 (00:57 -0500)]
Change the default theme to "Default"

We are not shipping Adwaita anymore.

5 years agoMake the theme variants available as themes
Matthias Clasen [Fri, 15 Jan 2021 06:07:08 +0000 (01:07 -0500)]
Make the theme variants available as themes

This makes it easier to implement the theme switching
in widget-factory, since we don't have a variant setting.

5 years agoReorganize our themes
Matthias Clasen [Fri, 15 Jan 2021 05:25:30 +0000 (00:25 -0500)]
Reorganize our themes

Rename the included theme to Default, with 4 variants:
light, dark, hc, hc-dark. This replaces Adwaita,
Adwaita:dark, HighContrast and HighContrastInverse.
We still make the themes available under these names,
and we still set up Adwaita-dark and HighContrastInverse
as the dark variants of Adwaita and HighContrast.

The unification of the theme variants under Default
is not quite perfect; it would be nice to merge
the assets/ and assets-hc/ subdirectories and render
all assets from a single svg file.

5 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Thu, 1 Apr 2021 15:10:50 +0000 (15:10 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

snapshot: scale border widths when appending border nodes

Closes #3819

See merge request GNOME/gtk!3384

5 years agosnapshot: Move sanity checks to a better place
Benjamin Otte [Thu, 1 Apr 2021 14:37:47 +0000 (16:37 +0200)]
snapshot: Move sanity checks to a better place

Fixes cases where the sanity checks would reject valid code, like when
using GL shaders on a scaled transform.

Fixes #3819

5 years agosnapshot: scale border widths when appending border nodes
Benjamin Otte [Thu, 1 Apr 2021 14:20:32 +0000 (16:20 +0200)]
snapshot: scale border widths when appending border nodes

Found by Matthias on IRC while arguing about GtkSnapshot being too
complicated.

5 years agoMerge branch 'filechooser-signal-disconnect' into 'master'
Matthias Clasen [Thu, 1 Apr 2021 14:25:08 +0000 (14:25 +0000)]
Merge branch 'filechooser-signal-disconnect' into 'master'

filechooserwidget: Disconnect settings signal on dispose

See merge request GNOME/gtk!3383

5 years agoMerge branch 'wip/exalm/overshoot-changes' into 'master'
Carlos Garnacho [Thu, 1 Apr 2021 12:11:15 +0000 (12:11 +0000)]
Merge branch 'wip/exalm/overshoot-changes' into 'master'

scrolledwindow: Cancel overshoot on dimension changes

Closes #3752

See merge request GNOME/gtk!3300

5 years agoscrolledwindow: Cancel overshoot on dimension changes
Alexander Mikhaylenko [Mon, 15 Mar 2021 12:17:01 +0000 (17:17 +0500)]
scrolledwindow: Cancel overshoot on dimension changes

If we scroll down in a list that's still being filled, we hit the edge and
initiate overshoot, and then the adjustment's upper value increases. This
leads to an unwanted bounce back.

Additionally, if in a similar situation the upper value decreases, the
overscroll glow gets stuck.

Update kinetic scrolling upper and lower value on changes, and immediately
cancel it if dimensions on that side change.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3752

5 years agofilechooserwidget: Reduce code duplication for disconnecting settings signal
Rafał Dzięgiel [Thu, 1 Apr 2021 07:36:19 +0000 (09:36 +0200)]
filechooserwidget: Reduce code duplication for disconnecting settings signal

Instead of getting current display before calling settings signal removal,
do it inside remove function and only if there is a signal connection to remove.

5 years agofilechooserwidget: Disconnect settings signal on dispose
Rafał Dzięgiel [Thu, 1 Apr 2021 07:27:06 +0000 (09:27 +0200)]
filechooserwidget: Disconnect settings signal on dispose

Settings signal was not being disconnected on dispose causing
application crash when user changed icon theme after dialog disposal.

5 years agoMerge branch 'ebassi/broadway-docs' into 'master'
Matthias Clasen [Wed, 31 Mar 2021 21:42:59 +0000 (21:42 +0000)]
Merge branch 'ebassi/broadway-docs' into 'master'

docs: Update the Broadway instructions

See merge request GNOME/gtk!3380

5 years agoMerge branch 'ebassi/docs-links' into 'master'
Matthias Clasen [Wed, 31 Mar 2021 21:42:49 +0000 (21:42 +0000)]
Merge branch 'ebassi/docs-links' into 'master'

docs: Update the links to the docs of GTK dependencies

Closes #3817

See merge request GNOME/gtk!3381

5 years agoMerge branch 'offscreen-fixes' into 'master'
Matthias Clasen [Wed, 31 Mar 2021 21:27:18 +0000 (21:27 +0000)]
Merge branch 'offscreen-fixes' into 'master'

Offscreen fixes

See merge request GNOME/gtk!3379

5 years agogsk: Add another test
Matthias Clasen [Wed, 31 Mar 2021 11:49:58 +0000 (07:49 -0400)]
gsk: Add another test

Compare clipped repeat nodes. Must skip cairo here
since it blurred the child by scaling after rendering.

Also skip the gl renderer, since it hasn't been fixed
for this yet. ngl passes this test.